﻿using Common.Communication;
using DeviceBase.Enums;
using DeviceBase.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace DeviceBase.Interfaces
{
    public interface IJueYuanNaiYa:IDevice
    {
        /// <summary>
        /// 新建测试方案
        /// </summary>
        /// <returns></returns>
        Result<bool> NewTest(int steps);
        /// <summary>
        /// 设置蜂鸣器
        /// </summary>
        /// <returns></returns>
        Result<bool> SetBeep(bool isOn);
        /// <summary>
        /// 设置测试参数
        /// </summary>
        /// <param name="mode"></param>
        /// <param name="step"></param>
        /// <param name="vol"></param>
        /// <param name="upTime"></param>
        /// <param name="downTime"></param>
        /// <param name="keepTime"></param>
        /// <param name="min"></param>
        /// <param name="max"></param>
        /// <param name="freq"></param>
        /// <param name="arc"></param>
        /// <returns></returns>
        Result<bool> SetTest(JueYuanNaiYaEnum.JueYuanNaiYaMode mode, int step,
                    double vol, double upTime, double downTime, double keepTime,
                    double min, double max,
                    int freq = 0, double arc = 0);
        /// <summary>
        /// 开始测试
        /// </summary>
        /// <returns></returns>
        Result<List<JueYuanNaiYaResult>> StartTest(int timeout);
        /// <summary>
        /// 停止测试
        /// </summary>
        /// <returns></returns>
        Result<bool> StopTest();
    }
}
